var WxAutoImage = require('../../js/wxAutoImageCal.js');
var app = getApp();

Page({
  data: {
    imgUrls: [
      '../../image/swiper1.jpg',
      '../../image/swiper1.jpg',
      '../../image/swiper1.jpg'
    ],
    indicatorDots: true,
    vertical: false,
    autoplay: true,
    interval: 3000,
    duration: 1200,
    iconArray: [
      {
        "iconUrl": '../../image/icon-qiandao.png',
        "iconText": '小曼故事'
      },
      {
        "iconUrl": '../../image/icon-fujin.png',
        "iconText": '找病友'
      },
      {
        "iconUrl": '../../image/icon-zhanhui.png',
        "iconText": '找医生'
      },
      {
        "iconUrl": '../../image/icon-fuli.png',
        "iconText": '健康课堂'
      },
      {
        "iconUrl": '../../image/icon-muma.png',
        "iconText": '我的提醒'
      },
      {
        "iconUrl": '../../image/icon-xingxing.png',
        "iconText": '写日记'
      },
      {
        "iconUrl": '../../image/icon-tiyu.png',
        "iconText": '记报告'
      },
      {
        "iconUrl": '../../image/icon-qinzi.png',
        "iconText": '健康分析'
      }
    ],
    itemArray: [
      {
        "itemUrl": '../../image/huaju.jpeg',
        "itemText": '11月20日话剧《风声》'
      },
      {
        "itemUrl": '../../image/huaju.jpeg',
        "itemText": '11月20日话剧《原野》'
      },
      {
        "itemUrl": '../../image/huaju.jpeg',
        "itemText": '11月28日“夜店”演唱会'
      },
    ]
  },
  /**
 * 生命周期函数--监听页面加载
 */
  onLoad: function (options) {
    app._request({
      url: "/users/getusers",
      method: 'POST',
      success: function (e) {
        console.log(e);
      }
    });
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },
  cusImageLoad: function (e) {
    var that = this;
    that.setData(WxAutoImage.wxAutoImageCal(e));
  },
})